package cn.learn.designpattern.command;

/**
 * @author huangyezhan
 * @version 1.0
 * @date 2021年07月11日10:26
 */
public class TestCommand {
    public static void main(String[] args) {
        SimpleRemoteControl remote  = new SimpleRemoteControl();
        Light               light   = new Light();
        LightOnCommand      lightOn = new LightOnCommand(light);

        remote.setCommand(lightOn);
        remote.buttonWasPressed();
    }
}
